package org.ponly.lpf4j;

import java.util.Collection;

/**
 * 扩展注册表
 *
 * @author vacoor
 */
public interface ExtensionRegistry {

    <E> void registerExtension(Class<E> extensionPoint, E extension);

    <E> void registerExtension(Class<E> extensionPoint, E extension, int loadingOrder);

    <E> void unregisterExtension(Class<E> extensionPoint, E extension);

    boolean hasAnyExtensions(Class<?> extensionPoint);

    <E> E getExtension(Class<E> extensionPoint);

    <E> Collection<E> getExtensions(Class<E> extensionPoint);

}
